package com.wlhse.service.impl;

import com.wlhse.dao.ProblemImportDao1;
import com.wlhse.dto.inDto.ProblemImportInDto1;
import com.wlhse.service.ProblemImportService1;
import com.wlhse.util.state_code.CodeDict;
import com.wlhse.util.state_code.NR;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


@Service
public class ProblemImportService1Impl implements ProblemImportService1 {

    @Resource
    private ProblemImportDao1 problemImportDao1;


    @Override
    public String listTaskName(ProblemImportInDto1 problemImportInDto1, int userId) {
        return NR.r(problemImportDao1.queryTaskName(problemImportInDto1.getTaskName(), userId), 0, 0);
    }


    @Override
    public String listCheck(ProblemImportInDto1 problemImportInDto1) {
        return NR.r(problemImportDao1.queryCheck(problemImportInDto1.getTaskID()));
    }

    @Override
    public String listPlanContent(ProblemImportInDto1 problemImportInDto1) {
        return NR.r(problemImportDao1.queryPlanContent(problemImportInDto1.getPlanID()), 0, 0);
    }

    @Override
    public String listProblemDescription(ProblemImportInDto1 problemImportInDto1) {
        return NR.r(problemImportDao1.queryProblemDescription(problemImportInDto1.getDescription()), 0, 0);
    }

    @Override
    public String listProblemRank(ProblemImportInDto1 problemImportInDto1) {

        return NR.r(problemImportDao1.queryProblemRank(problemImportInDto1.getProblemDescriptionCode()), 0, 0);
    }

    @Override
    public String listProblemClass1() {

        return NR.r(problemImportDao1.queryProblemClass1(), 0, 0);

    }

    @Override
    public String listProblemClass2(ProblemImportInDto1 problemImportInDto1) {

        return NR.r(problemImportDao1.queryProblemClass2(problemImportInDto1.getProblemFactorCode2()), 0, 0);

    }

    @Override
    public String listProblemSource() {
        return NR.r(problemImportDao1.queryProblemSource(), 0, 0);

    }

    @Override
    public String listTaskAndProcess() {
        return NR.r(problemImportDao1.queryTaskAndProcess(), 0, 0);
    }

    @Override
    public String listProcess(ProblemImportInDto1 problemImportInDto1) {
        return NR.r(problemImportDao1.queryProcess(problemImportInDto1.getTaskAndProcessCode()), 0, 0);
    }
}
